package cn.toutatis.sandbox.root.systemService.entity;

import cn.toutatis.common.controllerDepand.EntityBasicAttribute;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 首页左侧菜单
 * </p>
 *
 * @author Toutatis_Gc
 * @since 2020-07-09
 */
public class SystemMenu extends EntityBasicAttribute<SystemMenu> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 父ID
     */
    @TableField("parentId")
    private String parentId;

    /**
     * 图标类名
     */
    private String label;

    /**
     * 地址
     */
    private String url;

    /**
     * 名称
     */
    @TableField("`name`")
    private String name;

    /**
     * 权重
     */
    private Integer weight;

    @TableField(exist = false)
    private List<SystemMenu> child = new ArrayList<>();

    public List<SystemMenu> getChild() {
        return child;
    }

    public void setChild(List<SystemMenu> child) {
        this.child = child;
    }

    public String getParentId() {
        return parentId;
    }


    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
    public String getLabel() {
        return label;
    }


    public void setLabel(String label) {
        this.label = label;
    }
    public String getUrl() {
        return url;
    }


    public void setUrl(String url) {
        this.url = url;
    }
    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }
    public Integer getWeight() {
        return weight;
    }


    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    protected Serializable pkVal() {
        return null;
    }

    @Override
    public String toString() {
        return "SystemMenu{" +
                "id='" + id + '\'' +
                ", parentId='" + parentId + '\'' +
                ", label='" + label + '\'' +
                ", url='" + url + '\'' +
                ", name='" + name + '\'' +
                ", weight=" + weight +
                ", reservedId=" + reservedId +
                ", reservedMsg='" + reservedMsg + '\'' +
                ", createTime=" + createTime +
                ", status='" + status + '\'' +
                '}';
    }
}
